<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>hello_react</title>
</head>
<body>
    <div id="test"></div>

    <!-- 引入 react 核心库 -->
    <script src="./js/react.development.js" type="text/javascript"></script>
    <script src="./js/react-dom.development.js" type="text/javascript"></script>
    <script src="./js/babel.min.js" type="text/javascript"></script>

    <script type="text/babel">
        const data = ['Angular', 'React', 'Vue']
        // 创建虚拟 DOM 
        const vDOM = (
            <div>    
                <h1>前端框架列表</h1>
                <ul>
                    {
                        data.map((item, index) => {
                            return <li key={index}>{item}</li>
                        })
                    }    
                </ul>
            </div>
        )
        // 渲染虚拟DOM 到页面
        ReactDOM.render(vDOM, document.querySelector('#test'))
    </script>
</body>
</html>